using System;
using System.Collections;
using System.ComponentModel;
using System.Runtime.Serialization;


namespace Entities
{
    [Serializable]
    [System.Data.Services.Common.DataServiceKey("ID")]
    public class Authority:EntityBase
    {
        #region Authority Properties
        private System.Int32? _RoleCode;
		[DataMember] public virtual System.Int32? RoleCode
		{
			get
			{
				return _RoleCode;
			}
			set
			{
                if (_RoleCode != value)
                {
                    _RoleCode = value;
                    OnPropertyChanged("RoleCode");
                }
			}
		}
        private System.Int32? _WebpageID;
		[DataMember] public virtual System.Int32? WebpageID
		{
			get
			{
				return _WebpageID;
			}
			set
			{
                if (_WebpageID != value)
                {
                    _WebpageID = value;
                    OnPropertyChanged("WebpageID");
                }
			}
		}
        private System.Boolean? _Save;
		[DataMember] public virtual System.Boolean? Save
		{
			get
			{
				return _Save;
			}
			set
			{
                if (_Save != value)
                {
                    _Save = value;
                    OnPropertyChanged("Save");
                }
			}
		}
        private System.Boolean? _Update;
		[DataMember] public virtual System.Boolean? Update
		{
			get
			{
				return _Update;
			}
			set
			{
                if (_Update != value)
                {
                    _Update = value;
                    OnPropertyChanged("Update");
                }
			}
		}
        private System.Boolean? _Delete;
		[DataMember] public virtual System.Boolean? Delete
		{
			get
			{
				return _Delete;
			}
			set
			{
                if (_Delete != value)
                {
                    _Delete = value;
                    OnPropertyChanged("Delete");
                }
			}
		}
        private System.Boolean? _View;
		[DataMember] public virtual System.Boolean? View
		{
			get
			{
				return _View;
			}
			set
			{
                if (_View != value)
                {
                    _View = value;
                    OnPropertyChanged("View");
                }
			}
		}
        #endregion
        public override bool Equals(object obj)
        {
            if (obj == this) return true;
            if (obj == null) return false;
            if (obj is Authority)
            {
                return (this.ID == (obj as Authority).ID);
            }
            return false;
        }
        public override int GetHashCode()
        {
            return ID.GetHashCode();
        }
    }
}